Skip to content

Conversation

@coleleavitt
Copy link

This pull request adds support for Gentoo Linux as a recognized platform in the codebase. It introduces Gentoo-specific configuration, package lists, and package manager handling, ensuring that Gentoo can be properly detected and managed alongside other Linux distributions.

Gentoo Linux support:

  • Added gentoo to the list of known Linux platforms in PlatformDefinition and updated platform detection logic to recognize Gentoo systems. [1] [2]
  • Included Gentoo in the list of platforms handled by the HTTP client, enabling API compatibility.

Package management and configuration:

  • Added Gentoo-specific package list and mapped the package manager to emerge in the Linux platform implementation. [1] [2] [3]
  • Implemented package installation checks using Portage's qlist for Gentoo.

@cmcgee1024
Copy link
Member

Gentoo isn't a supported platform for the Swift toolchain and swiftly doesn't yet have support for explicitly marking platforms as experimental. This change would need to make it clear that Gentoo is in this experimental category and that it should be used at one's own risk.

There should be some kind of verification of Gentoo as well, so there would need to be a workflow added for it. This shouldn't be too difficult to add based on an official docker hub label. However, this workflow should be non-voting in case it breaks at some point.

@coleleavitt
Copy link
Author

coleleavitt commented Oct 28, 2025

Gentoo isn't a supported platform for the Swift toolchain and swiftly doesn't yet have support for explicitly marking platforms as experimental. This change would need to make it clear that Gentoo is in this experimental category and that it should be used at one's own risk.

There should be some kind of verification of Gentoo as well, so there would need to be a workflow added for it. This shouldn't be too difficult to add based on an official docker hub label. However, this workflow should be non-voting in case it breaks at some point.

gentoo actually does have a package for swift through the guru repository and also I was able to override the installation of swiftly for gentoo using the tool by just spoofing the version to ubuntu.

https://github.com/gentoo/guru/tree/master/dev-lang/swift
https://bugs.gentoo.org/567514

@cmcgee1024
Copy link
Member

gentoo actually does have a package for swift through the guru repository and also I was able to override the installation of swiftly for gentoo using the tool by just spoofing the version to ubuntu.

It's great to hear that more distributions picking up Swift.

The nature of swiftly is to work outside the distro packaging system so that a wide variety of toolchains can be installed and switched easily. It downloads the toolchains from swift.org, not from the distro's own repository. If those toolchains don't support the distro then things can break at random times with random toolchains whereas a distro version is supported and verified independently in their own system.

I think that's why if swiftly were to support Gentoo or other distros not supported by swift.org then they would need to be some kind of a "tier 3" (aka. community supported) level so that end-users are aware that things might not always work well and they shouldn't raise issues here unless they are willing to provide fixes for them. Alternatively, they can seek help on the swift forums.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants